package com.smileymedia.view;

import com.smileymedia.smil.stage.Stage;
import com.smileymedia.smil.stage.Timeline;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.widget.LinearLayout;

/**
 * Rendered responsible for rendering smil messages
 * @author greg
 *
 */
public class SmilRendererLayout extends LinearLayout {


	public SmilRendererLayout(Context context, AttributeSet attributes){
		super(context, attributes);
		mAttributes = attributes;

		init();
	}


	public SmilRendererLayout(Context context) {
		super(context);
		mContext=context;		
		init();
	}


	private void init() {

		defaultPaint = new Paint();
		defaultPaint.setARGB(255, 150, 150, 150);

	}


	public void setStage(Stage stage){
		mStage=stage;
	}


	@Override
	protected void dispatchDraw(Canvas canvas) {
		mStage.render(canvas);
		canvas.drawText("Hello world", 10, 10, defaultPaint);

	}

	public Paint defaultPaint;
	private AttributeSet mAttributes;
	private Stage mStage;
	private Context mContext;
}
